async function getComponent() {
  /*   return import( [> webpackChunkName:"lodash" <] 'lodash').then(({
   *     default: _
   *   }) => {
   *     const element = document.createElement('div');
   *     const btn = document.createElement('button')
   *
   *     element.innerHTML = _.join(['Hello', 'webpack'], ' ');
   *
   *     btn.innerHTML = 'Click me and check the console!';
   *     btn.onclick = printMe;
   *
   *     element.appendChild(btn);
   *
   *     return element;
   *   }).catch(err => 'an error'); */

  const element = document.createElement('div');
  const btn = document.createElement('button')

  const {
    default: _
  } = await import( /* webpackChunkName:'lodash' */ 'lodash');

  element.innerHTML = _.join(['Hello', 'webpack'], ' ');

  btn.innerHTML = 'Click me and check the console!';
  btn.onclick = e => import(/* webpackChunkName: "print" */ './print').then(module=>{
    const printMe = module.default;
    printMe();
  });

  element.appendChild(btn);
  return element;
}

getComponent().then(component => {
  document.body.appendChild(component);
});
